import Vue from "vue";
import App from "./App.vue";
import Antd, { ConfigProvider } from "ant-design-vue";
import "ant-design-vue/dist/antd.css";
// import "./styles/font.scss"; // 加载字体样式
import "./styles/common.scss"; //
import "@/styles/reset.css";
import router from "./router";
import instance from "./api/request";
import directive from "./directive"; // directive
import Cookies from 'js-cookie'
import VueCompositionAPI from '@vue/composition-api'
import zhCN from 'ant-design-vue/es/locale-provider/zh_CN';
import VueTianditu from "vue-tianditu";
import { desensitizePhone } from './utils/desensitize';
import { maskChineseIdCard } from './utils/idCardMask';
import moment from 'moment'
import locale from 'ant-design-vue/es/date-picker/locale/zh_CN';
import 'moment/locale/zh-cn'
import ToolTip from './component/toolTip.vue'

Vue.component('ToolTip', ToolTip)
moment.locale('zh-cn')
Vue.prototype.$desensitizePhone = desensitizePhone;
Vue.prototype.$maskChineseIdCard = maskChineseIdCard;
Vue.prototype.$axios = instance;
Vue.prototype.$locale = locale;
Vue.prototype.$zhCN = zhCN;
Vue.prototype.$cookies = Cookies;

Vue.config.productionTip = false;
Vue.use(Antd);
Vue.use(directive);
Vue.use(VueCompositionAPI);
Vue.use(VueTianditu, {
  v: "4.0", //目前只支持4.0版本
  tk: "3adf3cae3bf4115228084951a1c94161"
});

new Vue({
  router,
  render: (h) => h(ConfigProvider, {
    props: {
      locale: zhCN
    }
  }, [h(App)]),
}).$mount("#app");
